/**
 * @项目名称: modelview_lession01
 * @文件名称: PageController.java
 * @Date: 2016年12月08日
 * @Copyright: 2016 www.yunhe.cn Inc. All rights reserved.
 * 注意：本内容仅限于云和数据公司内部传阅，禁止外泄以及用于其他的商业目的
*/
package cn.yunhe.springmvc.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("yanshi")
public class PageController {
	
	@RequestMapping("cs")
	public String ceshi(){
		return "ceshi/user";
	}
	
	@RequestMapping("cs1")
	public ModelAndView ceshi1(){
		return new ModelAndView("ceshi/user");
	}
	
	@RequestMapping("cs2")
	public String ceshi2(){
		return "forward:cs.action";
	}
	
	@RequestMapping("cs21")
	public String ceshi21(){
		return "forward:cs";
	}
	
	@RequestMapping("cs22")
	public String ceshi22(){
		return "forward:/yanshi/cs";
	}
	
	// 加"/"是绝对根目录,不加"/"是相对目录
	@RequestMapping("cs23")
	public String ceshi23(){
		return "forward:/user.jsp";
	}
	
	@RequestMapping("cs3")
	public ModelAndView ceshi3(){
		return new ModelAndView("forward:cs");
	}
	
	@RequestMapping("cs31")
	public ModelAndView ceshi31(){
		return new ModelAndView("forward:/yanshi/cs");
	}
	
	@RequestMapping("cs32")
	public ModelAndView ceshi32(){
		return new ModelAndView("forward:/user.jsp");
	}
	
	
	@RequestMapping("cs4")
	public String ceshi4(){
		return "redirect:cs.action";
	}
	
	@RequestMapping("cs41")
	public String ceshi41(){
		return "redirect:cs";
	}
	
	@RequestMapping("cs42")
	public String ceshi42(){
		return "redirect:/yanshi/cs";
	}
	
	@RequestMapping("cs43")
	public String ceshi43(){
		return "redirect:/user.jsp";
	}
	
	@RequestMapping("cs44")
	public String ceshi44(){
		return "redirect:/order.html";
	}
	
}
